import Vue from 'vue'
import VueRouter from 'vue-router'
import VueMeta from 'vue-meta'

import Bar from './components/Bar.vue'

// 这边异步组件  明天还要看下 怎么解决
Vue.use(VueRouter)
Vue.use(VueMeta)
export default () => {
  let router = new VueRouter({
    mode: 'history',
    routes: [
      {path: '/', component: Bar},
      {path: '/foo', component: () => import('./components/Foo.vue')},
    ]
  })
  return router
}